#!/usr/bin/python
# -*- coding:utf-8 -*-
# @author  : micah
# @time    :  
# @function: 
# @version :


class Goods:
    def __init__(self):
        # 原价
        self.original_price = 100
        # 折扣
        self.discount = 0.8

    @property
    def price(self):
        new_price = self.original_price * self.discount
        return new_price

    # 想要涨价
    @price.setter
    def price(self, value):
        self.original_price = value

    @price.deleter
    def price(self):
        self.discount = 1


obj = Goods()

print(obj.price)
obj.price = 200
print(obj.price)

del obj.price
print(obj.price)

"""
对于价格进行控制
"""